<div id="search">
<form method="get" action="index.php">
<div class="label">
<label for="searchfield" id="searchlabel">Reference Search</label>
<input type="text" name="q" class="text" id="searchfield" />
</div>
<input type="hidden" name="p" value="search" />
</form>
</div>
<script type="text/javascript">
{literal}
$(function() {	
    $("#searchfield").autocomplete("autocomplete.php?t=search", 
            { delay:10, minChars:3, formatItem:formatItem });

    $('#searchlabel').labelOver('over');
});

function formatItem(row) {
    return row[0] + "<br><i>" + row[1] + "</i>";
}	     
{/literal}
</script>